﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Triples {

    public class CardsControl : ItemsControl {
        public event EventHandler ContainerCreated;


        public CardsControl() {
            //this.DefaultStyleKey = typeof(CardsControl);
        }


        protected override bool IsItemItsOwnContainerOverride(object item) {
            return false;
        }

        protected override DependencyObject GetContainerForItemOverride() {
            PlayableCardControl control = new PlayableCardControl();

            if (null != ContainerCreated) ContainerCreated(control, new EventArgs());
            return control;
        }

        //protected override Size ArrangeOverride(Size finalSize) {
        //    return base.ArrangeOverride(finalSize);
        //}

        //protected override Size MeasureOverride(Size availableSize) {
        //    return base.MeasureOverride(availableSize);
        //}

        //protected override void ClearContainerForItemOverride(DependencyObject element, object item) {
        //    base.ClearContainerForItemOverride(element, item);
        //}

        //protected override void PrepareContainerForItemOverride(DependencyObject element, object item) {
        //    base.PrepareContainerForItemOverride(element, item);
        //}
    }
}
